#define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 2e5 + 10;
int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n;
		cin >> n;
		int l = 0, r = 0, u = 0, d = 0;
		for (int i = 1; i <= n; i++)
		{
			int x, y;
			cin >> x >> y;
			l = min(l, x);
			r = max(r, x);
			u = max(u, y);
			d = min(d, y);
		}
		cout << 2 * ((r - l) + (u - d)) << endl;
	}
	return 0;
}